import request from "@/utils/request.js";
import baseUrl from "@/utils/version.js";

export function delete_role(id) {
    return request.delete(baseUrl.system.v1 + `/role/${id}`);
}

export function update_role(id, data) {
    return request.put(baseUrl.system.v1 + `/role/${id}`, data);
}

export function status_role(id) {
    return request.put(baseUrl.system.v1 + `/role/status/${id}`);
}

export function get_role(id) {
    return request.get(baseUrl.system.v1 + `/role/${id}`);
}

export function list_role(page, pageSize) {
    return request.get(baseUrl.system.v1 + `/role?page${page}&pageSize=${pageSize}`);
}